/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 容器样式：全屏布局 */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部栏：系统标题 + 用户信息，背景色改为金色 */
.header {
    background-color: #D4AF37; /* 金色 */
    color: #333; /* 文字颜色调整为深色，与金色更搭配 */
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.system-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
}

.system-title i {
    margin-right: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.return-portal {
    color: #333; /* 文字颜色改为深色 */
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.return-portal:hover {
    opacity: 0.8;
}

.return-portal i {
    margin-right: 5px;
}

/* 面包屑导航：路径指引 */
.breadcrumb {
    background-color: white;
    padding: 10px 20px;
    border-bottom: 1px solid #e1e4e8;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    margin: 0 8px;
    color: #999;
}

/* 主内容区：侧边栏 + 右侧内容 */
.main-container {
    display: flex;
    flex: 1;
}

/* 侧边栏：导航菜单，背景色改为金色 */
.sidebar {
    width: 200px;
    background-color: #D4AF37; /* 金色 */
    color: #333; /* 文字颜色改为深色 */
    flex-shrink: 0;
}

.nav-menu {
    padding-top: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333; /* 文字颜色改为深色 */
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item i {
    width: 20px;
    margin-right: 10px;
}

.nav-item:hover {
    background-color: #B8860B; /* 更深的金色， hover 效果 */
    color: #fff; /* hover 时文字变白 */
}

.nav-item.active {
    background-color: #B8860B; /* 更深的金色， active 效果 */
    color: #fff; /* active 时文字变白 */
    border-left: 3px solid #fff; /* 左侧边框改为白色 */
}

/* 右侧内容区域 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h1 {
    font-size: 20px;
    color: #333;
}

/* 筛选面板：条件查询 */
.filter-panel {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    color: #666;
    font-size: 14px;
}

/* 表格容器：数据展示 */
.table-container {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e4e8;
}

.data-table th {
    background-color: #f5f7fa;
    font-weight: bold;
    color: #666;
}

.data-table tr:hover {
    background-color: #f9fafc;
}

/* 按钮样式：统一交互 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.2s;
    text-decoration: none;
}

.btn i {
    margin-right: 5px;
}

.btn:hover {
    opacity: 0.9;
}

/* 按钮类型区分 */
.btn-primary { background-color: #007bff; color: white; }
.btn-secondary { background-color: #e1e4e8; color: #333; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-export { background-color: #28a745; color: white; }
.btn-search { background-color: #007bff; color: white; }
.btn-reset { background-color: #6c757d; color: white; }
.btn-add { background-color: #28a745; color: white; }
.btn-view { background-color: #007bff; color: white; }
.btn-approve { background-color: #28a745; color: white; }
.btn-reject { background-color: #dc3545; color: white; }
.btn-edit { background-color: #ffc107; color: #333; }
.btn-delete { background-color: #dc3545; color: white; }

.action-buttons {
    display: flex;
    gap: 5px;
}

/* 分页：数据切换 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.page-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.page-btn:hover {
    background-color: #f5f7fa;
}

.page-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 状态标签：颜色区分状态 */
.status-pending {
    display: inline-block;
    padding: 2px 6px;
    background-color: #ffc107;
    color: #333;
    border-radius: 4px;
    font-size: 12px;
}
.status-approved {
    display: inline-block;
    padding: 2px 6px;
    background-color: #28a745;
    color: white;
    border-radius: 4px;
    font-size: 12px;
}
.status-rejected {
    display: inline-block;
    padding: 2px 6px;
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
    font-size: 12px;
}
.status-processing {
    display: inline-block;
    padding: 2px 6px;
    background-color: #17a2b8;
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

/* 表单元素：输入控件 */
.form-select, .form-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 180px;
}

.form-textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

/* 模态框：弹窗交互 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid #e1e4e8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

/* 响应式调整：适配小屏幕 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .nav-menu {
        display: flex;
        overflow-x: auto;
    }

    .nav-item {
        flex-direction: column;
        padding: 10px;
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .nav-item i {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .filter-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-item {
        width: 100%;
    }

    .form-select, .form-input {
        width: 100%;
    }

    .action-buttons {
        flex-wrap: wrap;
    }
}